import Mock from 'mockjs'
import loginAPI from './login'
import goodsAPI from './goods'

const dataWrapper = (data) => ({code: 200, data});
// Mock.setup({
  timeout: '1000-2000'
// })

// 登录相关
Mock.mock(/\/login\/login/, 'post', loginAPI.loginByUsername)
Mock.mock(/\/login\/logout/, 'post', loginAPI.logout)
Mock.mock(/\/user\/info\.*/, 'get', loginAPI.getUserInfo)
Mock.mock(/\/goods\.*/, 'get', goodsAPI.getGoods)

export default Mock
